<template>
  <el-config-provider :locale="locale">
    <router-view />
    <!-- <keep-alive-vue3 :cache="true" :defaultCache="true" /> -->
  </el-config-provider>
</template>

<script>
//导入组件
import { ElConfigProvider } from "element-plus";
import zhCn from "element-plus/lib/locale/lang/zh-cn";
import { initHowxm } from "howxm-js";
export default {
  name: "App",
  components: {
    [ElConfigProvider.name]: ElConfigProvider
  },
  created() {
    const { VITE_HOWXM_APPID, VITE_PROJECT_ENV } = import.meta.env;
    console.log("当前系统环境==>>", VITE_PROJECT_ENV);
    // 生产环境和测试环境才初始化浩客
    if (VITE_PROJECT_ENV === "pre" || VITE_PROJECT_ENV === "uat") {
      initHowxm(VITE_HOWXM_APPID);
    }
  },
  data() {
    return {
      locale: zhCn
    };
  }
};
</script>
